
global_analysis_data <- read_csv("./data/global_analysis_data.csv")

global_figure <-
  global_analysis_data %>%
  ggplot(aes(x=web_val, y = wbgi_gee)) +
  geom_point(shape = 21, alpha = 0.2, fill = "lightgrey", color = "black") +
  geom_smooth(method = "lm", linetype = "dashed", color = "black", size = 0.4) +
  stat_summary_bin(geom = "point", shape = 21, fill = "lightpink", color = "black", size = 2.5, bins = 12) +
  theme_bw()+ 
  theme(axis.line.x.bottom = element_line(color = "black"),
        axis.line.y.left = element_line(color = "black"),
        text = element_text(size=14),
        panel.grid.major = element_blank(),
        panel.grid.minor.x = element_blank(),
        legend.position = "none",
        panel.border = element_blank(),
        axis.ticks = element_blank()) +
  xlab("Ever Fair to Skip Public Transit Fare (1-10)\n(Subset to Public Sector Employees)") +
  ylab("Government Effectiveness Index (WWGI)")



ggsave(filename = "./outputs/figures/figure_a2.pdf", plot = global_figure, width = 5, height = 5)


